package cn.xc.org.domain;

import cn.xc.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {
    //部门编号
    private String sn;
    //部门名称
    private String name;
    //部门的路径
    private String dirPath;
    //部门的状态 1启用 0禁用
    private Integer state = 1;
    //部门经理id
    private Long manager_id;
    //保存上級經理的信息
    private Employee manager;
    //上级部门id
    private Long parent_id;
    //保存上級部門的信息
    private Department parent;

    //無極樹
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();
}
